import { GET, POST } from '@/service';

/**
 * 素材类型列表
 * @param {*} params
 * @returns Promise
 */
export const materialTypeList = (params) => {
	const url = '/api/tdMaterial/type/list';

	return GET(url, params);
};

/**
 * 素材详情列表
 * @param {*} params materialType：素材类型：1图片 2视频
 * @returns Promise
 */
export const materialDetailList = (params) => {
	const url = '/api/tdMaterial/detail/list';

	return GET(url, params);
};

/**
 * 素材下载
 * @param {*} params
 * @returns Promise
 */
export const downMaterialUrl = (params) => {
	const url = '/api/tdMaterial/query/url';

	return GET(url, params);
};

/**
 * 素材下载-埋点
 * @param {*} params
 * @returns Promise
 */
export const downMaterialRecordUrl = (params) => {
	const url = '/api/tdMaterial/download/callback';

	return POST(url, params);
};

/**
 * 素材详情列表
 * @param {*} params
 * @returns Promise
 */
export const materialAllList = (params) => {
	const url = '/api/tdMaterial/all/list';

	return GET(url, params);
};
// https://mp-dyfx-pre.lianlianlvyou.com/api/tdMaterial/all/list?productId=269792
